package cn.com.headfree.callback.back;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;

import com.gta.edu.sdk.base.call.callback.UserAuthServerCallBack;

import cn.com.headfree.base.controller.ResultData;
import cn.com.headfree.callback.call.IWorkFlowServerCall;


@Component
public class WorkFlowServerCallBack implements IWorkFlowServerCall{
	private static final Logger log = LogManager.getLogger(UserAuthServerCallBack.class);

	@Override
	public ResultData findWorkFlowsBySysCode(String sysCode) {
		String errorMsg = "通过sysCode【"+sysCode+"】调用comm-work-flow-server组件的接口获取工作流列表失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData saveApproveRecord(String workFlowId, String businessId, String workFlowApproveCondition,
			String currentUserId, String approveAdvise, String domainId) {
		String errorMsg = "提交流程调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData approveRecord(String approveId, String approveAdvise, String currentUserId, String domainId,String approveCondition) {
		String errorMsg = "审批流程调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData findWaitApproveWorkFlow(String sysCode,String currentUserId, int pageSize, int pageNo) {
		String errorMsg = "查找待审批流程调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData findApprovedWorkFlow(String sysCode, String currentUserId, int pageSize, int pageNo) {
		String errorMsg = "查找已审批流程调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData getNextWorkFlowCondition(String approveId) {
		String errorMsg = "根据审批ID获取流程该节点审批条件数据调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

	@Override
	public ResultData findApprovedRecord(String businessId) {
		String errorMsg = "根据业务ID获取该业务的审批记录调用comm-work-flow-server组件的接口失败！";
		ResultData result = new ResultData();
		result.setSuccess(false);
		result.setErrorMsg(errorMsg);
		log.error(errorMsg);
		return result;
	}

}
